package com.example.administrator.orchardeveryday.dao;

/**
 * Created by Administrator on 15-10-25.
 */
public class DbBean {
    public static class UserDb
    {
        public static final String TABLE_USER="user";
        public static final String USER_ID="id";
        public static final String USER_NAME="name";
        public static final String USER_PWD="pwd";
        public static final String CREATE_USER_TAB=
                        "create table if not exists "+ TABLE_USER
                        +"("
                        +USER_ID+" integer primary key autoincrement,"
                        +USER_NAME+" text,"
                        +USER_PWD+" text"
                        +")";
        public static final String DROP_TAB="DROP TABLE "+TABLE_USER;
    }
    public static class GoodsDb
    {
        public static final String TABLE_GOODS="goods";
        public static final String GOODS_ID="id";
        public static final String GOODS_NAME="name";
        public static final String GOODS_PRICE="price";
        public static final String GOODS_NUMBER="number";
        public static final String CREATE_GOODS_TAB=
                "create table if not exists "+ TABLE_GOODS
                        +"("
                        +GOODS_ID+" integer primary key autoincrement,"
                        +GOODS_NAME+" text,"
                        +GOODS_NUMBER+" integer,"
                        +GOODS_PRICE+" real"
                        +")";

        public static final String DROP_TAB="DROP TABLE "+TABLE_GOODS;
        public static final String DELETE_CAR=
                "delete  from "+TABLE_GOODS;
        public static final String UPDATE_GOODS=
                "UPDATE " + TABLE_GOODS + "  SET " + GOODS_NUMBER + "=?  where " + GOODS_ID + "=?";
    }
}
